package com.qwert.shortlink.admin.remote.dto;

import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.TypeReference;
import com.qwert.shortlink.admin.common.convention.result.Result;
import com.qwert.shortlink.admin.remote.dto.req.reyclebin.RecycleBinSaveReqDTO;

/**
 * @author qwert
 * @version 1.0.0
 * @create 2024/7/6 20:59
 **/
public interface RecycleBinRemoteService {
    default Result<Integer> saveRecycleBin(RecycleBinSaveReqDTO recycleBinSaveReqDTO){
        String resultSave = HttpUtil.post("http://localhost:8001/api/shortlink/v1/recycle-bin/save", JSON.toJSONString(recycleBinSaveReqDTO));
        return JSON.parseObject(resultSave, new TypeReference<>() {
        });
    }
}
